第 5 步:为了更改字符串中的字母,我们需要将字符串转换为单个元素的列表。
- 从,在pig_latin()函数块中删除Convert String to List 。
- 将列表的变量名称更改为letters并将list()中的参数从my_var为word 。
- 从将Print Variable放入pig_latin()并将my_var更改为letters 。
- 打开控制台。我们打印了一个我们传递给函数的单词的字母列表: ['h', 'e', 'l', 'l', 'o' ]
To navigate the page using the TAB key, first press ESC to exit the code editor.